﻿@page
@model LittleBlog.Web.Pages.IndexModel
@{
    ViewData["Title"] = "首页";
}
<div style="width: 100%; height: 200px; display: flex; justify-content: flex-start; place-items: center">
    <p class="h1">
        @Model.SiteInfo.SiteName
        <small class="text-muted"> @(Model.SiteInfo.Welcome ?? string.Empty)</small>
    </p>
</div>

@foreach (var article in Model.Articles)
{
    <div class="card mb-3">
        <a class="link-default" asp-area="" asp-page="/Article" asp-route-id="@article.Id">
            <div class="card-body">
                <p class="h3">
                    @article.Title
                </p>

                <p class="text-muted">
                    @article.Abstract
                </p>
            </div>
        </a>
        <div class="card-footer bg-transparent">
            <span class="text-muted">
                作者
            </span>
            <span>
                @article.Author
            </span>
            &nbsp;&nbsp;
            <span class="text-muted">
                发布于
            </span>
            <span>
                @article.LastEditTime.ToString("yyyy-MM-dd HH:mm:ss")
            </span>
            &nbsp;&nbsp;
            <span class="text-muted">
                浏览数
            </span>
            <span>
                0
            </span>
        </div>
    </div>
}

